<template>
  <!-- 底部 -->
  <footer class="hd-footer" :style="styles">
    <p class="footerLinks">
      <a class="footerLink">{{name}}</a>
    </p>
    <p>
       {{copyright}}
    </p>
  </footer>
</template>

<script>
export default {
  name: 'hd-footer',
  data () {
    return {}
  },
  props: {
    name: String,
    copyright: String,
    height: {
      validator(value) {
        return /^(\.|\d+\.)?\d+(px|rem)$/.test(value)
      },
      default: '1.6rem'
    }
  },
  computed: {
    styles() {
      const style = {}
      if (this.height) {
        style.height = this.height;
      }
      return style
    }
  }
}
</script>

<style lang="stylus" scoped>
// 底部 开始
.hd-footer
  text-align center
  p
    margin-bottom 0px
    a
      color #586C94
  .footerLinks
    padding-top 2px
// 底部 结束
</style>

